package cloud.redis;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author cunfeng
 * @create 2021-05-06 10:23
 */

@ConfigurationProperties(prefix = "myredis")
public class MyRedisProperties {


    /**
     * ip地址
     */
    private String host;

    /**
     * 端口号
     */
    private  int  port;

    /**
     * 密码
     */
    private String password;

    /**
     * 接池中总连接的最大数量
     */
    private int   maxActive;

    /**
     *  连接池中空闲连接的最大数量
     */
    private int   maxIdle;

    /**
     * 最大建立连接等待时间
     */
    private  int  maxWait;
    /**
     * 超时时间
     */

    private  int timeout;

    /**
     *    第几个数据库
     */
    private int database;


    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public int getMaxActive() {
        return maxActive;
    }

    public void setMaxActive(int maxActive) {
        this.maxActive = maxActive;
    }

    public int getMaxIdle() {
        return maxIdle;
    }

    public void setMaxIdle(int maxIdle) {
        this.maxIdle = maxIdle;
    }

    public int getMaxWait() {
        return maxWait;
    }

    public void setMaxWait(int maxWait) {
        this.maxWait = maxWait;
    }

    public int getTimeout() {
        return timeout;
    }

    public void setTimeout(int timeout) {
        this.timeout = timeout;
    }

    public int getDatabase() {
        return database;
    }

    public void setDatabase(int database) {
        this.database = database;
    }
}